package com.fuhe.chen.vendingmachine.constant;

/**
 * Created by Donghua.Chen on 2018/4/29.
 */
public interface MessageConstant {

    interface Common {
        static final String PARAM_IS_EMPTY = "参数为空";
        static final String INVALID_PARAM = "无效的参数";
        static final String CAN_NOT_FIND_PARAM_TO_CONTIUNE = "找不到参数继续运行";
    }

    interface ShoppingCart {
        static final String SHOPPINGCART_IS_NULL = "购物车中没有商品!请先将商品添加购物车";
        static final String COMMODITY_REPEAT = "购物车中已有该商品!请前往购物车查看";

        static final Integer ADD_SUCCESS = 10000;
        static final Integer ADD_REPEAT = 31111;
    }

    interface Machine {
        static final Integer DEFEAT_CAPACITY_CODE = 41111;
        static final String DEFEAT_CAPACITY_MESSAGE = "缺少机器容量参数";
    }


    interface BookOrder {
        static final Integer CANCEL_BOOK_ORDER_FAILURE_CODE = 51111;
        static final Integer BOOK_ORDER_IS_NULL_CODE = 52222;

        static final String CANCEL_BOOK_ORDER_SUCCESS = "取消订单成功";
        static final String CANCEL_BOOK_ORDER_FAILURE = "取消订单失败";
        static final String APPLY_REFUND_BOOK_ORDER_SUCCESS = "申请订单退款成功";
        static final String REFUSE_REFUND_BOOK_ORDER_SUCCESS = "取消订单退款成功";

        static final String BOOK_ORDER_IS_NULL = "订单信息不存在";
        static final String BOOK_ORDER_STATUS_ERROR = "订单状态错误";
        static final String REFUND_BOOK_ORDER_FINISH_ERROR = "订单已经完成退款";
        static final String NO_SUCH_ORDER_ID = "未查询到订单号";
    }

    interface Admin {
        static final Integer REFUSE_REFUND_FAILURE_CODE = 71111;
        static final String REFUSE_REFUND_FAILURE_MESSAGE = "拒绝退款失败";
    }


    interface Att {
        static final String ADD_NEW_ATT_FAIL = "添加附件信息失败";
        static final String UPDATE_ATT_FAIL = "更新附件信息失败";
        static final String DELETE_ATT_FAIL = "删除附件信息失败";
        static final String UPLOAD_FILE_FAIL = "上传附件失败";
    }

    interface Error {
        static final int NO_QUERY_PERMISSION_CODE = 13333;
        static final int NO_DELETE_PERMISSION_CODE = 14444;
        static final int NO_DO_PERMISSION_CODE = 15555;
        static final int NO_ADD_PERMISSION_CODE = 17777;
        static final int USERNAME_ALREADY_EXISTS_CODE = 21111;
        static final int INVALID_PARAM_CODE = 22222;

        static final String USERNAME_PASSWORD_IS_EMPTY = "用户名和密码不可为空";
        static final String USERNAME_PASSWORD_ERROR = "用户名不存在或密码错误";
        static final String NOT_LOGIN = "用户未登录";
        static final String NO_QUERY_PERMISSION_MESSAGE = "没有查询权限";
        static final String NO_DELETE_PERMISSION_MESSAGE = "没有删除权限";
        static final String NO_DO_PERMISSION_MESSAGE = "没有操作权限";
        static final String NO_ADD_PERMISSION_MESSAGE = "非本人用户id不能添加";
        static final String USERNAME_ALREADY_EXISTS_MESSAGE = "用户名已存在";
    }

    interface Success {
        static final int SUCCESS_CODE = 10000;

        static final String QUERY_SUCCESS_MESSAGE = "查询成功";
        static final String CREATE_SUCCESS_MESSAGE = "创建成功";
        static final String SIGN_UP_SUCCESS_MESSAGE = "账户创建成功";
        static final String UPDATE_SUCCESS_MESSAGE = "修改成功";
        static final String DELETE_SUCCESS_MESSAGE = "删除成功";
        static final String DO_SUCCESS_MESSAGE = "操作成功";
    }
}
